-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix not found page on thread leave #26602
fix not found page on thread leave #26602
Conversation
Thanks @b4s36t4 I'll do the test ASAP! |
@b4s36t4 I try to leave and open again on the old thread, but I'm getting the not found page. The log results show that the report object has a Screen.Recording.2023-09-04.at.23.30.55.movIt's working well leave the new thread created. |
@mollfpr means this is only happening with old threads? not new thread? |
@b4s36t4 Yes, only on the old thread. |
@mollfpr I'll fix this and update the fix. |
Thanks @b4s36t4 for the quick response 👍 |
Hey, @mollfpr I tried to repro this issue. I haven't been able. if any workspace is there that have old threads/you're using test account could you share the details? add me to workspace: maheshvagicherla99438+3@gmail.com |
@b4s36t4 It's not reproduced on a specific thread. Try this step.
|
I think better approach is to add, And with this approach you won't need to change |
No @BhuvaneshPatil I don't think so. We have different logic here.
Not Relavent App/src/libs/actions/Report.js Line 410 in 62e2a0c
And I don't wanna change the wrapper component, because it might cause more issues. |
okay |
@mollfpr I had to update the logic inside the report to show loader correctly. Reasons for logic update
Issues* Would love to take your thoughts on this. |
@mollfpr Omit in the sense? Sorry I'm not able to understand your suggestion. You're suggesting that we check for emptiness of a report by omiting those two keys? so that we show loader even if the leaving thread done in offline? |
Sorry, I understand the issue now. Omitting the key won't fix the loading issue.
Does this issue exist in the last commit? |
Yes, this is because of checks I have added in last commit. |
We should eliminate that issue. I think sending a message on the left thread will make the user join the thread again. |
Right the only issue I see is how we're going to handle the issue in offline scenario, if user leaves a thread while in offline we show loading page, not-found page? since they haven't left the thread yet because of offline let them use the thread just as they do? Tagging @trjExpensify for the expected behaviour. |
So, let's show the loader at any case if the user leaves is the expected behaviour right? @mollfpr |
Do you mean showing the loader while the waiting for the API response? |
No worries 👍 Here's what I'm thinking about the expected behavior:
Let me know if this make sense to you. |
@mollfpr should see |
@b4s36t4 Should see the |
Hm, but why? I think we want to avoid a "hmm.. this page can't be found" error screen when you leave a thread.
Why the NotFoundPage when revisting a thread offline?
When it resolves, why would they see the NotFoundPage instead of the actual contents of the thread? CC: @chiragsalian would be good to consult here on this behaviour in and around threads. |
@trjExpensify These are the concluded points we've talked on 1:1 |
We will not see the not found page online because we will show the skeleton loader once we get the result from the API. It's either the report found, and we will show the content, or the report is not available from the BE then the not found page will be shown.
We already have this, and the original issue is off from offline flow. Although it makes sense to show the skeleton loader here, it's out of scope from the original issue, and I'm not sure how the effort for @ b4s36t4 is. But it's better to decide here and what the next move should be. |
If a page isn't available from the backend because you're offline, then we should more accurately show the "full page blocking" offline message to explain that's because you're offline, and that you need to come back online to view the contents of the page. That's the appropriate offline "pattern D" handling, isn't it? It's more informative and accurate than effectively communicating something is broken with "Hmm.. this page isn't here" just because you're offline. |
I'm not entirely sure what the questions are for me. Plus @luacmartins might be able to answer as well since its more specific to money requests. As for my thoughts,
I disagree with this. Why show the NotFoundPage when clicking a thread online or offline. The user should have access to view this page and if its a loading delay i would rather just show a loading screen like we do when we click into regular threads while offline. (its perhaps not the best offline experience but i'd like to keep it consistent between money requests and threads so that if one day we update them then both are updated). If we still like to have Also when leaving a thread we should navigate to parent report or another report instead of showing NotFoundPage imo.
That doesn't sound right, for regular threads don't we show skeleton loader the moment we click into a thread even when offline?
Yeah i agree with this.
I would prefer revisiting this and figuring out its effort to keep the functionality here similar to regular threads. |
Kapture.2023-09-11.at.18.29.56.mp4I'm uploading the video with the current behaviour i.e in my local. This video give more clarity for people. |
From the video the online experience looks good to me. The offline looks incorrect. I'm not a fan of showing "Hmm, its not there" since that is misleading. |
Yes, I think it's either the skeleton UI in this case or, we use the established Pattern D "You appear to be offline" error screen which would be more discerning and informative. |
@trjExpensify Currently we are showing the skeleton loader while visiting the existing report, but the content is not yet saved in Onyx. So I think skeleton loader it is? @b4s36t4 Does change the offline behavior complicate this PR? |
I have updated the pr, but wouldn't take much time. So if I visit the thread either in offline or online we should show loader. Depends on api response the screen would result either in report or not found page right? |
Yes, only when there's no report exists with that reportID in the Onyx. |
Ok, Sure got it. Will update the PR soon. |
https://github.com/Expensify/App/assets/590889354c16ad-e11b-4c65-a2bf-93217287ca75 @mollfpr I have updated the code here's an example screen-recording of the behaviour of application (no change is done same screen-recordings that I attached first are good) |
Reviewer Checklist
Screenshots/VideosWeb26602.Web.mp4Mobile Web - Chrome26602.mWeb-Chrome.mp4Mobile Web - Safari26602.mWeb-Safari.mp4Desktop26602.Desktop.mp4iOS26602.iOS.mp4Android26602.Android.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.71-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.71-12 🚀
|
Details
Contains fix to show loader when we re-join the thread instead of showing NotFoundPage
Fixed Issues
$ #25698
PROPOSAL: #25698 (comment)
Tests
Offline tests
not found
pageQA Steps
Same as Tests section.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
web.mp4
Mobile Web - Chrome
a-web.mp4
Mobile Web - Safari
ios-web.mp4
Desktop
desktop.mp4
iOS
ios.mp4
Android
android.mp4